<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "tbl_friend".
 *
 * @property int $id
 * @property string $name
 * @property string $pic
 * @property int $pipeidu
 * @property int $tag
 * @property string $openid
 * @property string $friend_openid
 */
class Friend extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tbl_friend';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['pipeidu', 'tag'], 'integer'],
            [['name', 'pic', 'openid', 'friend_openid'], 'string', 'max' => 255],
            [['openid'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'pic' => 'Pic',
            'pipeidu' => 'Pipeidu',
            'tag' => 'Tag',
            'openid' => 'Openid',
            'friend_openid' => 'Friend Openid',
        ];
    }
}
